package org.qydjk.common.pojo;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "s_organization", catalog = "qydjk")
public class SOrganization implements java.io.Serializable {
	private static final long serialVersionUID = -6687631060121731714L;
	private Integer id;
	private String name;
	private String address;
	private String code;
	private String icon;
	private Integer pid;
	private Integer seq;
	private Date createTime;

	// Constructors

	/** default constructor */
	public SOrganization() {
	}

	/** minimal constructor */
	public SOrganization(String name, String code, Integer seq,
						 Date createTime) {
		this.name = name;
		this.code = code;
		this.seq = seq;
		this.createTime = createTime;
	}

	/** full constructor */
	public SOrganization(String name, String address, String code, String icon,
			Integer pid, Integer seq, Date createTime) {
		this.name = name;
		this.address = address;
		this.code = code;
		this.icon = icon;
		this.pid = pid;
		this.seq = seq;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false, length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "address", length = 100)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "code", nullable = false, length = 64)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "icon", length = 32)
	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Column(name = "pid")
	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	@Column(name = "seq", nullable = false)
	public Integer getSeq() {
		return this.seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}